package com.thz.friend.controller.analysis;

import com.thz.common.core.constants.HttpConstants;
import com.thz.common.core.controller.BaseController;
import com.thz.common.core.result.Result;
import com.thz.friend.pojo.analysis.LearningReport;
import com.thz.friend.pojo.analysis.StudentLearningData;
import com.thz.friend.service.analysis.LearningAnalysisService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.constraints.NotNull;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

@Tag(name = "学习分析接口")
@RestController
@RequestMapping("/analysis")
@RequiredArgsConstructor
public class LearningAnalysisController extends BaseController {

    private final LearningAnalysisService learningAnalysisService;

    @Operation(summary = "获取学习报告")
    @PostMapping("/get/report")
    public Result<String> getReport(@RequestHeader(HttpConstants.AUTHENTICATION) String token) {
        return Result.ok(learningAnalysisService.getReport(token));
    }

} 